\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph}{}\section{Introduction\+To\+Algorithm\+:\+:Graph\+Algorithm\+:\+:Graph$<$ N, V\+Type $>$ Struct Template Reference}
\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph$<$ N, V\+Type $>$@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph$<$ N, V\+Type $>$}}


Graph：图，算法导论22章22.1节  




{\ttfamily \#include $<$graph.\+h$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef int \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type}
\item 
typedef int \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a77f6d3ef31203e0d6ebd2ed87928978a}{E\+Weight\+Type}
\item 
typedef std\+::tuple$<$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type}, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type}, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a77f6d3ef31203e0d6ebd2ed87928978a}{E\+Weight\+Type} $>$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad1eb485d135eb8076a44b00904ae2f5a}{Edge\+Tuple\+Type}
\item 
typedef V\+Type \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a95fc613ee7f50f11c84d56c19dc6d321}{Vertex\+Type}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a1effb22f7cc51898e54bbb3a5f549c95}{Graph} (\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a77f6d3ef31203e0d6ebd2ed87928978a}{E\+Weight\+Type} val)
\begin{DoxyCompactList}\small\item\em 显式构造函数，为图的矩阵指定{\ttfamily invalid\+\_\+weight} \end{DoxyCompactList}\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a554fe807fb375fe4e56e5b0a0ac21477}{Graph} ()
\begin{DoxyCompactList}\small\item\em 默认构造函数 \end{DoxyCompactList}\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a172f460e7f689fa42dcb3f1130d3fa64}{add\+\_\+vertex} (const typename Vertex\+Type\+::\+Key\+Type \&key)
\begin{DoxyCompactList}\small\item\em add\+\_\+vertex\+:添加一个顶点 \end{DoxyCompactList}\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad22898c16f9f614c0826bd62500317de}{add\+\_\+vertex} (const typename Vertex\+Type\+::\+Key\+Type \&key, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id)
\begin{DoxyCompactList}\small\item\em add\+\_\+vertex\+:添加一个顶点 \end{DoxyCompactList}\item 
void \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ae36e2ef188da844f75a673516a6c7225}{modify\+\_\+vertex} (const typename Vertex\+Type\+::\+Key\+Type \&newkey, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id)
\begin{DoxyCompactList}\small\item\em modify\+\_\+vertex\+:修改一个顶点的数据 \end{DoxyCompactList}\item 
void \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a3ddca71ba690d09471a7de78bcaa6fea}{add\+\_\+edge} (const \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad1eb485d135eb8076a44b00904ae2f5a}{Edge\+Tuple\+Type} \&edge\+\_\+tuple)
\begin{DoxyCompactList}\small\item\em add\+\_\+edge\+:添加一条边 \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Iterator $>$ }\\void \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_abda82467495ef0109b14061a6bbe84b9}{add\+\_\+edges} (const Iterator \&begin, const Iterator \&end)
\begin{DoxyCompactList}\small\item\em add\+\_\+edges\+:添加一组边 \end{DoxyCompactList}\item 
void \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_abfbc7f8a38017fd1422b5c6f1e8b6594}{adjust\+\_\+edge} (\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id1, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id2, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a77f6d3ef31203e0d6ebd2ed87928978a}{E\+Weight\+Type} wt)
\begin{DoxyCompactList}\small\item\em adjust\+\_\+edge\+:修改一条边的权重 \end{DoxyCompactList}\item 
const std\+::vector$<$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad1eb485d135eb8076a44b00904ae2f5a}{Edge\+Tuple\+Type} $>$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a0cadf10557297a2cb10aec457eb70b3f}{edge\+\_\+tuples} () const 
\begin{DoxyCompactList}\small\item\em edge\+\_\+tuples\+:返回图中所有边的三元素元组集合，这里集合采用{\ttfamily std\+::vector$<$std\+::tuple$<$V\+I\+D\+Type,V\+I\+D\+Type,E\+Weight\+Type$>$$>$} \end{DoxyCompactList}\item 
const std\+::vector$<$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad1eb485d135eb8076a44b00904ae2f5a}{Edge\+Tuple\+Type} $>$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a1a36b41adf54b242ff40610eae219eda}{vertex\+\_\+edge\+\_\+tuples} (\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id) const 
\begin{DoxyCompactList}\small\item\em vertex\+\_\+edge\+\_\+tuples\+:返回图中从指定顶点出发的边的三元素元组集合，这里集合采用{\ttfamily std\+::vector$<$std\+::tuple$<$V\+I\+D\+Type,V\+I\+D\+Type,E\+Weight\+Type$>$$>$} \end{DoxyCompactList}\item 
bool \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ac6f3559ac73a84a45285d2906b9f7557}{has\+\_\+edge} (\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id\+\_\+from, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id\+\_\+to) const 
\begin{DoxyCompactList}\small\item\em has\+\_\+edge\+:返回图中指定顶点之间是否存在边 \end{DoxyCompactList}\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a77f6d3ef31203e0d6ebd2ed87928978a}{E\+Weight\+Type} \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a9736f238bdedf0d6fccc064e6acea65d}{weight} (\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id\+\_\+from, \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{V\+I\+D\+Type} id\+\_\+to) const 
\begin{DoxyCompactList}\small\item\em weight\+:返回图中指定顶点之间的边的权重 \end{DoxyCompactList}\item 
std\+::shared\+\_\+ptr$<$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph}{Graph} $>$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aec06e55b6164700f65dcc08dafe79666}{inverse} ()
\begin{DoxyCompactList}\small\item\em inverse\+:返回图的一个镜像 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
std\+::array$<$ std\+::shared\+\_\+ptr$<$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a95fc613ee7f50f11c84d56c19dc6d321}{Vertex\+Type} $>$, N $>$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aea254564996a6a172f001ebf7f3c5f65}{vertexes}
\item 
std\+::size\+\_\+t \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a07a8f2eafc8175787a6ce1f26f1252d0}{next\+\_\+empty\+\_\+vertex}
\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_matrix_graph}{Matrix\+Graph}$<$ N $>$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a498323460ec613f12e1039afdca6c10a}{matrix}
\item 
\hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_a_d_j_list_graph}{A\+D\+J\+List\+Graph}$<$ N $>$ \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a4442db9dd1bbb7fe543353df4fa1ba9f}{adj\+List}
\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const unsigned \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aba53db2c8cade306553fc1e03f138aa2}{N\+U\+M} =N
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$unsigned N, typename V\+Type$>$struct Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph$<$ N, V\+Type $>$}

Graph：图，算法导论22章22.1节 

图的矩阵主要包含四个数据：


\begin{DoxyItemize}
\item {\ttfamily matrix}：图的矩阵表示，类型为{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_matrix_graph}{Matrix\+Graph}$<$N$>$}
\item {\ttfamily adj\+List}：图的邻接表表示，类型为{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_a_d_j_list_graph}{A\+D\+J\+List\+Graph}$<$N$>$}
\item {\ttfamily vertexes}：顶点集合，类型为{\ttfamily std\+::array$<$std\+::shared\+\_\+ptr$<$Vertex\+Type$>$,N$>$}。它是一个{\ttfamily std\+::array}，其元素类型为指向顶点的强引用
\item {\ttfamily next\+\_\+empty\+\_\+vertex}：顶点集合中，下一个为空的位置，类型为{\ttfamily std\+::size\+\_\+t}。它用于添加顶点。
\end{DoxyItemize}

图支持插入、修改顶点操作，插入、修改边操作（由图的矩阵以及图的邻接表来代理），以及返回边、返回权重（由图的矩阵以及图的邻接表来代理）。 

Definition at line 42 of file graph.\+h.



\subsection{Member Typedef Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad1eb485d135eb8076a44b00904ae2f5a}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!Edge\+Tuple\+Type@{Edge\+Tuple\+Type}}
\index{Edge\+Tuple\+Type@{Edge\+Tuple\+Type}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{Edge\+Tuple\+Type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ typedef std\+::tuple$<${\bf V\+I\+D\+Type},{\bf V\+I\+D\+Type},{\bf E\+Weight\+Type}$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::{\bf Edge\+Tuple\+Type}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad1eb485d135eb8076a44b00904ae2f5a}
边的三元素（顶点1编号，顶点2编号，权重)组成的元组 

Definition at line 46 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a77f6d3ef31203e0d6ebd2ed87928978a}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!E\+Weight\+Type@{E\+Weight\+Type}}
\index{E\+Weight\+Type@{E\+Weight\+Type}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{E\+Weight\+Type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ typedef int {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::{\bf E\+Weight\+Type}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a77f6d3ef31203e0d6ebd2ed87928978a}
权重的类型 

Definition at line 45 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a95fc613ee7f50f11c84d56c19dc6d321}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!Vertex\+Type@{Vertex\+Type}}
\index{Vertex\+Type@{Vertex\+Type}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{Vertex\+Type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ typedef V\+Type {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::{\bf Vertex\+Type}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a95fc613ee7f50f11c84d56c19dc6d321}
顶点的类型 

Definition at line 47 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!V\+I\+D\+Type@{V\+I\+D\+Type}}
\index{V\+I\+D\+Type@{V\+I\+D\+Type}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{V\+I\+D\+Type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ typedef int {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::{\bf V\+I\+D\+Type}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a507632614d13e91d29acbf8acb0b0f0f}
顶点编号的类型 

Definition at line 44 of file graph.\+h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a1effb22f7cc51898e54bbb3a5f549c95}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!Graph@{Graph}}
\index{Graph@{Graph}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{Graph(\+E\+Weight\+Type val)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::{\bf Graph} (
\begin{DoxyParamCaption}
\item[{{\bf E\+Weight\+Type}}]{val}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a1effb22f7cc51898e54bbb3a5f549c95}


显式构造函数，为图的矩阵指定{\ttfamily invalid\+\_\+weight} 


\begin{DoxyParams}{Parameters}
{\em val\+:无效权重值} & \\
\hline
\end{DoxyParams}


Definition at line 54 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a554fe807fb375fe4e56e5b0a0ac21477}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!Graph@{Graph}}
\index{Graph@{Graph}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{Graph()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::{\bf Graph} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a554fe807fb375fe4e56e5b0a0ac21477}


默认构造函数 



Definition at line 57 of file graph.\+h.



\subsection{Member Function Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a3ddca71ba690d09471a7de78bcaa6fea}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!add\+\_\+edge@{add\+\_\+edge}}
\index{add\+\_\+edge@{add\+\_\+edge}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{add\+\_\+edge(const Edge\+Tuple\+Type \&edge\+\_\+tuple)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ void {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::add\+\_\+edge (
\begin{DoxyParamCaption}
\item[{const {\bf Edge\+Tuple\+Type} \&}]{edge\+\_\+tuple}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a3ddca71ba690d09471a7de78bcaa6fea}


add\+\_\+edge\+:添加一条边 


\begin{DoxyParams}{Parameters}
{\em edge\+\_\+tuple\+:一条边的三元素元组} & 为了便于计算，添加边时并不是添加{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_edge}{Edge}}类型，而是{\ttfamily std\+::tuple$<$V\+I\+D\+Type,V\+I\+D\+Type,E\+Weight\+Type$>$}类型的值。\\
\hline
\end{DoxyParams}
添加边之前如果边指定的任何一个顶点无效，则抛出异常：


\begin{DoxyItemize}
\item 如果指定的顶点{\ttfamily id}不在{\ttfamily \mbox{[}0,N)}之间，则无效
\item 如果不存在某个顶点与指定的顶点{\ttfamily id}相同，则无效
\end{DoxyItemize}

在添加边时，同时向图的矩阵、图的邻接表中添加边

如果添加的边是无效权重，则直接返回而不添加 

Definition at line 129 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_abda82467495ef0109b14061a6bbe84b9}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!add\+\_\+edges@{add\+\_\+edges}}
\index{add\+\_\+edges@{add\+\_\+edges}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{add\+\_\+edges(const Iterator \&begin, const Iterator \&end)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ template$<$typename Iterator $>$ void {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::add\+\_\+edges (
\begin{DoxyParamCaption}
\item[{const Iterator \&}]{begin, }
\item[{const Iterator \&}]{end}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_abda82467495ef0109b14061a6bbe84b9}


add\+\_\+edges\+:添加一组边 


\begin{DoxyParams}{Parameters}
{\em begin\+:边容器的起始迭代器} & \\
\hline
{\em end\+:边容器的终止迭代器} & 为了便于计算，添加边时并不是添加{\ttfamily \hyperlink{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_edge}{Edge}}类型，而是{\ttfamily std\+::tuple$<$V\+I\+D\+Type,V\+I\+D\+Type,E\+Weight\+Type$>$}类型的值\\
\hline
\end{DoxyParams}
在添加边时，同时向图的矩阵、图的邻接表中添加边 

Definition at line 151 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a172f460e7f689fa42dcb3f1130d3fa64}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!add\+\_\+vertex@{add\+\_\+vertex}}
\index{add\+\_\+vertex@{add\+\_\+vertex}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{add\+\_\+vertex(const typename Vertex\+Type\+::\+Key\+Type \&key)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ {\bf V\+I\+D\+Type} {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::add\+\_\+vertex (
\begin{DoxyParamCaption}
\item[{const typename Vertex\+Type\+::\+Key\+Type \&}]{key}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a172f460e7f689fa42dcb3f1130d3fa64}


add\+\_\+vertex\+:添加一个顶点 


\begin{DoxyParams}{Parameters}
{\em key\+:顶点存放的数据} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\+: 顶点的id
\end{DoxyReturn}
如果已经有了\+N个顶点，则图的顶点已满，则抛出{\ttfamily std\+::invalid\+\_\+argument}异常.

在每一次添加顶点之前会从{\ttfamily next\+\_\+empty\+\_\+vertex·指定的位置处开始寻找可以添加顶点的地方。如果找不到可以添加顶点的地方，则抛出}std\+::invalid\+\_\+argument`异常 

Definition at line 68 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad22898c16f9f614c0826bd62500317de}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!add\+\_\+vertex@{add\+\_\+vertex}}
\index{add\+\_\+vertex@{add\+\_\+vertex}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{add\+\_\+vertex(const typename Vertex\+Type\+::\+Key\+Type \&key, V\+I\+D\+Type id)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ {\bf V\+I\+D\+Type} {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::add\+\_\+vertex (
\begin{DoxyParamCaption}
\item[{const typename Vertex\+Type\+::\+Key\+Type \&}]{key, }
\item[{{\bf V\+I\+D\+Type}}]{id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ad22898c16f9f614c0826bd62500317de}


add\+\_\+vertex\+:添加一个顶点 


\begin{DoxyParams}{Parameters}
{\em key\+:顶点存放的数据} & \\
\hline
{\em id\+:指定该顶点的$<$tt$>$id$<$/tt$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\+: 顶点的id
\end{DoxyReturn}

\begin{DoxyItemize}
\item 如果{\ttfamily id$<$0}或者{\ttfamily id$>$=N}，则抛出异常。因为正常的顶点{\ttfamily id}在{\ttfamily \mbox{[}0,N)}之间
\item 如果已经存在某个顶点的{\ttfamily id}为指定的{\ttfamily id}，则抛出异常 
\end{DoxyItemize}

Definition at line 88 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_abfbc7f8a38017fd1422b5c6f1e8b6594}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!adjust\+\_\+edge@{adjust\+\_\+edge}}
\index{adjust\+\_\+edge@{adjust\+\_\+edge}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{adjust\+\_\+edge(\+V\+I\+D\+Type id1, V\+I\+D\+Type id2, E\+Weight\+Type wt)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ void {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::adjust\+\_\+edge (
\begin{DoxyParamCaption}
\item[{{\bf V\+I\+D\+Type}}]{id1, }
\item[{{\bf V\+I\+D\+Type}}]{id2, }
\item[{{\bf E\+Weight\+Type}}]{wt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_abfbc7f8a38017fd1422b5c6f1e8b6594}


adjust\+\_\+edge\+:修改一条边的权重 


\begin{DoxyParams}{Parameters}
{\em id1\+:待修改边的第一个顶点} & \\
\hline
{\em id2\+:待修改边的第二个顶点} & \\
\hline
{\em wt\+:新的权重} & 修改边权重之前如果边指定的任何一个顶点无效，则抛出异常：\\
\hline
\end{DoxyParams}

\begin{DoxyItemize}
\item 如果指定的顶点{\ttfamily id}不在{\ttfamily \mbox{[}0,N)}之间，则无效
\item 如果不存在某个顶点与指定的顶点{\ttfamily id}相同，则无效 
\end{DoxyItemize}

Definition at line 174 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a0cadf10557297a2cb10aec457eb70b3f}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!edge\+\_\+tuples@{edge\+\_\+tuples}}
\index{edge\+\_\+tuples@{edge\+\_\+tuples}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{edge\+\_\+tuples() const }]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ const std\+::vector$<${\bf Edge\+Tuple\+Type}$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::edge\+\_\+tuples (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a0cadf10557297a2cb10aec457eb70b3f}


edge\+\_\+tuples\+:返回图中所有边的三元素元组集合，这里集合采用{\ttfamily std\+::vector$<$std\+::tuple$<$V\+I\+D\+Type,V\+I\+D\+Type,E\+Weight\+Type$>$$>$} 

\begin{DoxyReturn}{Returns}
\+:图中所有边的三元素元组集合
\end{DoxyReturn}
要求图的矩阵和图的邻接表都返回同样的结果 

Definition at line 189 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ac6f3559ac73a84a45285d2906b9f7557}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!has\+\_\+edge@{has\+\_\+edge}}
\index{has\+\_\+edge@{has\+\_\+edge}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{has\+\_\+edge(\+V\+I\+D\+Type id\+\_\+from, V\+I\+D\+Type id\+\_\+to) const }]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ bool {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::has\+\_\+edge (
\begin{DoxyParamCaption}
\item[{{\bf V\+I\+D\+Type}}]{id\+\_\+from, }
\item[{{\bf V\+I\+D\+Type}}]{id\+\_\+to}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ac6f3559ac73a84a45285d2906b9f7557}


has\+\_\+edge\+:返回图中指定顶点之间是否存在边 


\begin{DoxyParams}{Parameters}
{\em id\+\_\+from} & 第一个顶点的{\ttfamily id} \\
\hline
{\em id\+\_\+to} & 第二个顶点的{\ttfamily id} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\+:第一个顶点和第二个顶点之间是否存在边
\end{DoxyReturn}
要求图的矩阵和图的邻接表都返回同样的结果

如果边指定的任何一个顶点无效，则抛出异常：


\begin{DoxyItemize}
\item 如果指定的顶点{\ttfamily id}不在{\ttfamily \mbox{[}0,N)}之间，则无效
\item 如果不存在某个顶点与指定的顶点{\ttfamily id}相同，则无效 
\end{DoxyItemize}

Definition at line 253 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aec06e55b6164700f65dcc08dafe79666}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!inverse@{inverse}}
\index{inverse@{inverse}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{inverse()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ std\+::shared\+\_\+ptr$<${\bf Graph}$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::inverse (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aec06e55b6164700f65dcc08dafe79666}


inverse\+:返回图的一个镜像 

\begin{DoxyReturn}{Returns}
\+:图的一个镜像的一个强引用
\end{DoxyReturn}
图的一个镜像也是一个图，它与原图有以下关系：


\begin{DoxyItemize}
\item 图的镜像的顶点与原图的顶点相同
\item 图的镜像的边是原图的边的反向
\end{DoxyItemize}

{\ttfamily inverse}方法首先新建一个图，再根据原图的顶点来执行顶点的深拷贝。然后再获取原图的边的反向边，将该反向边作为镜像图的边 

Definition at line 299 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ae36e2ef188da844f75a673516a6c7225}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!modify\+\_\+vertex@{modify\+\_\+vertex}}
\index{modify\+\_\+vertex@{modify\+\_\+vertex}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{modify\+\_\+vertex(const typename Vertex\+Type\+::\+Key\+Type \&newkey, V\+I\+D\+Type id)}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ void {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::modify\+\_\+vertex (
\begin{DoxyParamCaption}
\item[{const typename Vertex\+Type\+::\+Key\+Type \&}]{newkey, }
\item[{{\bf V\+I\+D\+Type}}]{id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_ae36e2ef188da844f75a673516a6c7225}


modify\+\_\+vertex\+:修改一个顶点的数据 


\begin{DoxyParams}{Parameters}
{\em newkey\+:新的数据} & \\
\hline
{\em id\+:指定该顶点的$<$tt$>$id$<$/tt$>$} & 
\begin{DoxyItemize}
\item 如果{\ttfamily id$<$0}或者{\ttfamily id$>$=N}，则抛出异常。因为正常的顶点{\ttfamily id}在{\ttfamily \mbox{[}0,N)}之间
\item 如果不存在某个顶点的{\ttfamily id}为指定的{\ttfamily id}，则抛出异常 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}


Definition at line 105 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a1a36b41adf54b242ff40610eae219eda}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!vertex\+\_\+edge\+\_\+tuples@{vertex\+\_\+edge\+\_\+tuples}}
\index{vertex\+\_\+edge\+\_\+tuples@{vertex\+\_\+edge\+\_\+tuples}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{vertex\+\_\+edge\+\_\+tuples(\+V\+I\+D\+Type id) const }]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ const std\+::vector$<${\bf Edge\+Tuple\+Type}$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::vertex\+\_\+edge\+\_\+tuples (
\begin{DoxyParamCaption}
\item[{{\bf V\+I\+D\+Type}}]{id}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a1a36b41adf54b242ff40610eae219eda}


vertex\+\_\+edge\+\_\+tuples\+:返回图中从指定顶点出发的边的三元素元组集合，这里集合采用{\ttfamily std\+::vector$<$std\+::tuple$<$V\+I\+D\+Type,V\+I\+D\+Type,E\+Weight\+Type$>$$>$} 


\begin{DoxyParams}{Parameters}
{\em id} & 指定顶点{\ttfamily id} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\+:图中指定顶点出发的边的三元素元组集合
\end{DoxyReturn}
要求图的矩阵和图的邻接表都返回同样的结果


\begin{DoxyItemize}
\item 如果指定的顶点{\ttfamily id}不在{\ttfamily \mbox{[}0,N)}之间，则无效
\item 如果不存在某个顶点与指定的顶点{\ttfamily id}相同，则无效 
\end{DoxyItemize}

Definition at line 217 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a9736f238bdedf0d6fccc064e6acea65d}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!weight@{weight}}
\index{weight@{weight}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{weight(\+V\+I\+D\+Type id\+\_\+from, V\+I\+D\+Type id\+\_\+to) const }]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ {\bf E\+Weight\+Type} {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::weight (
\begin{DoxyParamCaption}
\item[{{\bf V\+I\+D\+Type}}]{id\+\_\+from, }
\item[{{\bf V\+I\+D\+Type}}]{id\+\_\+to}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a9736f238bdedf0d6fccc064e6acea65d}


weight\+:返回图中指定顶点之间的边的权重 


\begin{DoxyParams}{Parameters}
{\em id\+\_\+from} & 第一个顶点的{\ttfamily id} \\
\hline
{\em id\+\_\+to} & 第二个顶点的{\ttfamily id} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\+:第一个顶点和第二个顶点之间的边的权重
\end{DoxyReturn}
要求图的矩阵和图的邻接表都返回同样的结果

如果边指定的任何一个顶点无效，则抛出异常：


\begin{DoxyItemize}
\item 如果指定的顶点{\ttfamily id}不在{\ttfamily \mbox{[}0,N)}之间，则无效
\item 如果不存在某个顶点与指定的顶点{\ttfamily id}相同，则无效 
\end{DoxyItemize}

Definition at line 278 of file graph.\+h.



\subsection{Member Data Documentation}
\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a4442db9dd1bbb7fe543353df4fa1ba9f}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!adj\+List@{adj\+List}}
\index{adj\+List@{adj\+List}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{adj\+List}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ {\bf A\+D\+J\+List\+Graph}$<$N$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::adj\+List}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a4442db9dd1bbb7fe543353df4fa1ba9f}


Definition at line 319 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a498323460ec613f12e1039afdca6c10a}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!matrix@{matrix}}
\index{matrix@{matrix}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{matrix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ {\bf Matrix\+Graph}$<$N$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::matrix}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a498323460ec613f12e1039afdca6c10a}


Definition at line 318 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a07a8f2eafc8175787a6ce1f26f1252d0}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!next\+\_\+empty\+\_\+vertex@{next\+\_\+empty\+\_\+vertex}}
\index{next\+\_\+empty\+\_\+vertex@{next\+\_\+empty\+\_\+vertex}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{next\+\_\+empty\+\_\+vertex}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ std\+::size\+\_\+t {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::next\+\_\+empty\+\_\+vertex}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_a07a8f2eafc8175787a6ce1f26f1252d0}


Definition at line 317 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aba53db2c8cade306553fc1e03f138aa2}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!N\+U\+M@{N\+U\+M}}
\index{N\+U\+M@{N\+U\+M}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{N\+U\+M}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ const unsigned {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::N\+U\+M =N\hspace{0.3cm}{\ttfamily [static]}}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aba53db2c8cade306553fc1e03f138aa2}
顶点的最大容量 

Definition at line 48 of file graph.\+h.

\hypertarget{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aea254564996a6a172f001ebf7f3c5f65}{}\index{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}!vertexes@{vertexes}}
\index{vertexes@{vertexes}!Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph@{Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}}
\subsubsection[{vertexes}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned N, typename V\+Type $>$ std\+::array$<$std\+::shared\+\_\+ptr$<${\bf Vertex\+Type}$>$,N$>$ {\bf Introduction\+To\+Algorithm\+::\+Graph\+Algorithm\+::\+Graph}$<$ N, V\+Type $>$\+::vertexes}\label{struct_introduction_to_algorithm_1_1_graph_algorithm_1_1_graph_aea254564996a6a172f001ebf7f3c5f65}


Definition at line 316 of file graph.\+h.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/graph\+\_\+algorithms/basic\+\_\+graph/graph\+\_\+representation/graph/\hyperlink{graph_8h}{graph.\+h}\end{DoxyCompactItemize}
